package com.example.bottom_tab.viewPagerAdapter;

import android.view.View;
import android.view.ViewGroup;
import com.example.bottom_tab.test1_fragmet;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;

import java.util.List;

public class MyAdapter extends FragmentPagerAdapter {
    List<Fragment> list;

    public MyAdapter(@NonNull FragmentManager fm, List<Fragment> list) {
        super(fm);
        this.list=list;
    }


    @NonNull
    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
